<?php

/**
 * Created by PhpStorm.
 * Author: ls
 * Time: 2024/1/4 10:34
 * Desc: 工厂模式
 */
class Service_Api_Member_Order_Factory
{
    private static $instance;

    public static function get_instance($type_id)
    {
        if (empty(self::$instance)) {
            switch ($type_id) {
                case 5:
                    self::$instance = new Service_Api_Member_Order_Spot();
                    break;
                default:
                    self::$instance = new Service_Api_Order();
                    break;
            }
        }
        return self::$instance;
    }
}